/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package net.tygzs.minerpg.CommandExecutor.MinePacket;

import net.md_5.bungee.api.ChatColor;
import net.tygzs.minerpg.Configuration.packet.Packet;
import net.tygzs.minerpg.Main;
import org.bukkit.command.CommandSender;

/**
 *
 * @author thtTNT
 */
public class Command_Create
{

    public static void CreatePacket(CommandSender sender, String PacketName)
    {
        if (Main.getPluginConfig().getPackets().containsKey(PacketName))
        {
            sender.sendMessage(ChatColor.RED + "相同名字的礼包已经存在了");
            return;
        }
        Packet packet = new Packet();
        packet.setName(PacketName);
        Main.getPluginConfig().getPackets().put(PacketName, packet);
        sender.sendMessage(ChatColor.GREEN + "创建成功");
    }
}
